﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;

namespace Zero.UControl.Component
{
    public class IconAttachHelper
    {
        public static string GetGlyph(DependencyObject obj)
        {
            return (string)obj.GetValue(GlyphProperty);
        }

        public static void SetGlyph(DependencyObject obj, string value)
        {
            obj.SetValue(GlyphProperty, value);
        }

        public static readonly DependencyProperty GlyphProperty =
            DependencyProperty.RegisterAttached("Glyph", typeof(string), typeof(IconAttachHelper), new PropertyMetadata(""));



        public static int GetIconSize(DependencyObject obj)
        {
            return (int)obj.GetValue(IconSizeProperty);
        }

        public static void SetIconSize(DependencyObject obj, int value)
        {
            obj.SetValue(IconSizeProperty, value);
        }

        public static readonly DependencyProperty IconSizeProperty =
            DependencyProperty.RegisterAttached("IconSize", typeof(int), typeof(IconAttachHelper), new PropertyMetadata(24));



        public static Brush GetIconColor(DependencyObject obj)
        {
            return (Brush)obj.GetValue(IconColorProperty);
        }

        public static void SetIconColor(DependencyObject obj, Brush value)
        {
            obj.SetValue(IconColorProperty, value);
        }

        public static readonly DependencyProperty IconColorProperty =
            DependencyProperty.RegisterAttached("IconColor", typeof(Brush), typeof(IconAttachHelper), new PropertyMetadata(new SolidColorBrush(Colors.Blue)));
    }
}
